package aeemqx

import (
	"context"
	"devops-super/utility/util/minioUtil"
)

func (s *sAeemqx) SaveWaveToOss(ctx context.Context, server string, bucket string, path string, data []byte) (err error) {
	minioKey := minioUtil.GetMinioConfkeyByServername(ctx, server)
	_, err = minioUtil.PutBytes(ctx, minioKey, bucket, path, data)
	if err != nil {
		return err
	}
	return nil
}

func (s *sAeemqx) DeleteWaveFromOss(ctx context.Context, server string, bucket string, path string) (err error) {
	minioKey := minioUtil.GetMinioConfkeyByServername(ctx, server)
	err = minioUtil.DeleteObject(ctx, minioKey, bucket, path)
	if err != nil {
		return err
	}
	return nil
}
